<template>
  <view >
    <u-modal :show="show"  :title="title" confirmText="关闭"  @confirm="confirm">
      <view class="slot-content">
        <rich-text :nodes="content"></rich-text>
      </view>
    </u-modal>
  </view>
</template>

<script>
import {getPublicityNoticeById} from "../../api/information.js"
export default {
  name:"commonWins",
  data() {
    return {
      show:false,
      title: '',
      content:''
    };
  },
  onReady() {
    this.getNotice()
  },
  methods: {
    //弹窗
    getNotice() {
      getPublicityNoticeById({
        classify: '',
        index: 2
      }).then(res => {
        if (res.data!=null){
          this.title = res.data.keyValue
          this.content = res.data.content
          this.show = true
        }
        // console.log(res)
      })
    },
    confirm() {
      this.show = false
    }
  }
}
</script>

<style lang="scss">

</style>